<template>
  <div class="cf">
    <div class="fr">
      <audio-picker @success="onSuccess"></audio-picker>
    </div>
    <div class="fr" style="padding-right: 16px;">
      <pic-picker @success="onSuccess"></pic-picker>
    </div>
    <div class="fr pdr-l">
      <video-picker @success="onSuccess"></video-picker>
    </div>
    <div class="fr pdr-l" v-if="fastReplyPicker">
      <fast-reply-picker @success="onFastReplySuccess"></fast-reply-picker>
    </div>
  </div>
</template>

<script>
import AudioPicker from '@/components/audio-picker'
import PicPicker from '@/components/pic-picker'
import VideoPicker from '@/components/video-picker'
import FastReplyPicker from '@/components/fast-reply-picker'

export default {
  props: {
    fastReplyPicker: {
      type: Boolean,
      default: true
    },
  },
  components: {
    PicPicker,
    VideoPicker,
    AudioPicker,
    FastReplyPicker,
  },
  computed: {
  },
  watch: {
  },
  methods: {
    onSuccess (item) {
      this.$emit('pick', item, 'media')
    },
    onFastReplySuccess (n) {
      this.$emit('pick', n, 'fast-reply')
    }
  }
}
</script>
